import request from '@/utils/request'

// 获取列表
export const selectAll = () => {
  return request({
    url: '/demo/gzj',
    method: 'get'
  })
}


export const insert = (data) => {
  return request({
    url: '/demo/gzj/insert',
    method: 'post',
    data: data
  })
}

export const updateTable = (data) => {
  return request({
    url: '/demo/gzj',
    method: 'put',
    data: data
  })
}

export const deleteTable = (id) => {
  return request({
    url: `/demo/gzj/${id}`,
    method: 'delete'
  })
}

export const getTableNames = () => {
  return request({
    url: '/demo/gzj/getTableNames',
    method: 'get'
  })
}

export const getTableColumns = (tableName) => {
  return request({
    url: `/demo/gzj/getTableColumns/${tableName}`,
    method: 'get'
  })
}


export const SM4Encry = (isOpen) => {
  return request({
    url: `/demo/gzj/SM4Encry`,
    method: 'post',
    data: isOpen
  })
}
